<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var obj = {"name1":"value1","name2":"value2","name3":"value3"};
			for(var str in obj){	
				/* 重点： */
				//此处for循环使用运算符 in 的话,for循环不仅仅可以对数组进行遍历,还可以对对象进行遍历
				console.log(obj[str]);
			}
			
			var result;
			result = "name3" in obj;
			console.log(result);
		</script>
	</body>
</html>